import Mock from 'mockjs'
const url = import.meta.env.VITE_APP_BASE_API
const Random = Mock.Random
Mock.setup({
    timeout: 0 - 300
})

if (import.meta.env.MODE == 'development') {
    Mock.mock(url + '/login', 'post', () => {
        return Mock.mock({
            code: 200,
            message: '登录成功',
            data: {
                token: "@guid"
            }
        })

    })
    Mock.mock(url + '/getUser', 'post', () => {
        return Mock.mock({
            code: 200,
            message: '获取成功',
            data: [
                {
                    path: '/config',
                    component: '/config',
                    isLayout: true,
                    title: '配置页',
                }
            ]
        })

    })
}  